import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';
import p002 from './p002';
// tslint:disable-next-line:class-name
interface par extends Event {
	page_no: number;
}
export default async function a002(fd: IFeidaoAiBrowserComponent,e: par) {
	// todo
	const res = await nodejs<{dt: Array<{}>;c: number}>('risk-control/zj-000005/s001', { pn:e.page_no });
	if ( res.dt.length > 0) {
		render(fd,res.dt,p001,'p001','inner');
	} else {
		render(fd,"",p002,'p002','inner');
	}
}
